import React from 'react';
import { Modal, Input, Form, DatePicker, Select, InputNumber } from 'antd';

const { Option } = Select;

const AddModule = ({ setAddModuleShow, addModuleShow }) => {
    const handleOk = () => {
        setAddModuleShow(false);
    };

    const handleCancel = () => {
        setAddModuleShow(false);
    };
    return <Modal title="开票登记" visible={addModuleShow} onOk={handleOk} onCancel={handleCancel}>
        <Form
            labelCol={{ span: 6 }}
            wrapperCol={{ span: 18 }}
        >
            <Form.Item
                label="开票时间"
                name="invoiceTime"
                rules={[{ required: true, message: '请选择开票时间' }]}
            >
                <DatePicker />
            </Form.Item>
            <Form.Item
                label="发票号码"
                name="invoiceNo"
                rules={[{ required: true, message: '请输入发票号码' }]}
            >
                <Input />
            </Form.Item>
            <Form.Item
                label="发票类型"
                name="invoiceKind"
                rules={[{ required: true, message: '请选择发票类型' }]}
            >
                <Select>
                    <Option value={0} >普通发票</Option>
                    <Option value={1} >增值税专用发票</Option>
                </Select>
            </Form.Item>
            <Form.Item
                label="开票金额"
                name="invoiceMoney"
                rules={[{ required: true, message: '请输入开票金额' }]}
            >
                <InputNumber />
            </Form.Item>
        </Form>
    </Modal>
}

export default AddModule;